package com.xiaol.springbootredis.common.enums;

/**
 * User: chenshun131 <p />
 * Time: 18/6/16 18:26  <p />
 * Version: V1.0  <p />
 * Description: <p />
 */
public enum StatusCode {
    /**
     * Gl 99990100 error code enums.
     */
    GL99990100(9999100, "参数异常"),
    /**
     * Gl 99990401 error code enums.
     */
    GL99990401(99990401, "无访问权限"),
    /**
     * Gl 000500 error code enums.
     */
    GL99990500(500, "未知异常"),
    /**
     * Gl 000403 error code enums.
     */
    GL99990403(9999403, "无权访问"),
    /**
     * Gl 000404 error code enums.
     */
    GL9999404(9999404, "找不到指定资源"),
    /**
     * Gl 99990001 error code enums.
     */
    GL99990001(99990001, "注解使用错误"),
    /**
     * Gl 99990002 error code enums.
     */
    GL99990002(99990002, "微服务不在线,或者网络超时"),
    /**
     * Uac 10010001 error code enums.
     */
    UAC10010001(10010001, "会话超时,请刷新页面重试"),
    /**
     * Uac 10010002 error code enums.
     */
    UAC10010002(10010002, "TOKEN解析失败"),
    /**
     * Uac 10010003 error code enums.
     */
    UAC10010003(10010003, "操作频率过快, 您的帐号已被冻结"),
    /**
     * Uac 10011001 error code enums.
     */
    UAC10011001(10011001, "用户Id不能为空"),
    /**
     * Uac 10011002 error code enums.
     */
    UAC10011002(10011002, "找不到用户,loginName=%s"),
    /**
     * Uac 10011003 error code enums.
     */
    UAC10011003(10011003, "找不到用户,userId=%s"),
    /**
     * Uac 10011004 error code enums.
     */
    UAC10011004(10011004, "找不到用户,email=%s"),
    /**
     * Uac 10011006 error code enums.
     */
    UAC10011006(10012006, "手机号不能为空"),
    /**
     * Uac 10011007 error code enums.
     */
    UAC10011007(10011007, "登录名不能为空"),
    /**
     * Uac 10011008 error code enums.
     */
    UAC10011008(10011008, "新密码不能为空"),
    /**
     * Uac 10011009 error code enums.
     */
    UAC10011009(10011009, "确认密码不能为空"),
    /**
     * Uac 10011010 error code enums.
     */
    UAC10011010(10011010, "两次密码不一致"),
    /**
     * Uac 10011011 error code enums.
     */
    UAC10011011(10011011, "用户不存在, userId=%s"),
    /**
     * Uac 10011012 error code enums.
     */
    UAC10011012(10011012, "登录名已存在"),
    /**
     * Uac 10011013 error code enums.
     */
    UAC10011013(10011013, "手机号已存在"),
    /**
     * Uac 10011014 error code enums.
     */
    UAC10011014(10011014, "密码不能为空"),
    /**
     * Uac 10011016 error code enums.
     */
    UAC10011016(10011016, "用户名或密码错误"),
    /**
     * Uac 10011017 error code enums.
     */
    UAC10011017(10011017, "验证类型错误"),
    /**
     * Uac 10011018 error code enums.
     */
    UAC10011018(10011018, "邮箱不能为空"),
    /**
     * Uac 10011019 error code enums.
     */
    UAC10011019(10011019, "邮箱已存在"),
    /**
     * Uac 10011020 error code enums.
     */
    UAC10011020(10011020, "短信模板不能为空"),
    /**
     * Uac 10011021 error code enums.
     */
    UAC10011021(10011021, "发送短信验证码对象转换为json字符串失败"),
    /**
     * Uac 10011022 error code enums.
     */
    UAC10011022(10011022, "发送验证码失败"),
    /**
     * Uac 10011023 error code enums.
     */
    UAC10011023(10011023, "越权操作"),
    /**
     * Uac 10011024 error code enums.
     */
    UAC10011024(10011024, "找不到绑定的用户, userId=%"),
    /**
     * Uac 10011025 error code enums.
     */
    UAC10011025(10011025, "用户已存在, loginName=%"),
    /**
     * Uac 10011026 error code enums.
     */
    UAC10011026(10011026, "更新用户失败, userId=%"),
    /**
     * Uac 10011027 error code enums.
     */
    UAC10011027(10011027, "找不到用户,mobile=%s"),
    /**
     * Uac 10011028 error code enums.
     */
    UAC10011028(10011028, "链接已失效"),
    /**
     * Uac 10011029 error code enums.
     */
    UAC10011029(10011029, "重置密码失败"),
    /**
     * Uac 10011030 error code enums.
     */
    UAC10011030(10011030, "激活失败, 链接已过期"),
    /**
     * Uac 10011031 error code enums.
     */
    UAC10011031(10011031, "验证码超时, 请重新发送验证码"),
    /**
     * Uac 10011032 error code enums.
     */
    UAC10011032(10011032, "邮箱不存在, loginName=%s,email=%s"),
    /**
     * Uac 10011033 error code enums.
     */
    UAC10011033(10011033, "清空该用户常用菜单失败"),
    /**
     * Uac 10011034 error code enums.
     */
    UAC10011034(10011034, "不允许操作admin用户"),
    /**
     * Uac 10011035 error code enums.
     */
    UAC10011035(10011035, "原始密码输入错误"),
    /**
     * Uac 10011036 error code enums.
     */
    UAC10011036(10011036, "新密码和原始密码不能相同"),
    /**
     * Uac 10011037 error code enums.
     */
    UAC10011037(10011037, "修改用户失败,userId=%s"),
    /**
     * Uac 10011038 error code enums.
     */
    UAC10011038(10011038, "激活用户失败,userId=%s"),
    /**
     * Uac 10011039 error code enums.
     */
    UAC10011039(10011039, "验证token失败"),
    /**
     * Uac 10011040 error code enums.
     */
    UAC10011040(10011040, "解析header失败"),
    /**
     * Uac 10011041 error code enums.
     */
    UAC10011041(10011041, "页面已过期,请重新登录"),
    /**
     * Uac 10011042 error code enums.
     */
    UAC10011042(10011042, "Cookie转码异常"),

    /**
     * Uac 10011043 error code enums.
     */
    UAC10011043(10011043, "修改手机号失败"),
    /**
     * Uac 10011044 error code enums.
     */
    UAC10011044(10011044, "修改邮箱失败"),
    /**
     * Uac 10011045 error code enums.
     */
    UAC10011045(10011045, "验证码过期"),
    /**
     * Uac 10011046 error code enums.
     */
    UAC10011046(10011046, "验证码错误"),
    /**
     * Uac 10011046 error code enums.
     */
    UAC10011047(10011047, "获取服务商域名失败"),


















    /**
     * Uac 10012001 error code enums.
     */
    UAC10012001(10012001, "角色ID不能为空"),
    /**
     * Uac 10012002 error code enums.
     */
    UAC10012002(10012002, "拥有的角色不允许禁用"),
    /**
     * Uac 10012003 error code enums.
     */
    UAC10012003(10012003, "系统角色不能删除"),
    /**
     * Uac 10012004 error code enums.
     */
    UAC10012004(10012004, "超级角色Id不能为空"),

    /**
     * Uac 10012005 error code enums.
     */
    UAC10012005(10012005, "找不到角色信息,roleId=%s"),
    /**
     * Uac 10012006 error code enums.
     */
    UAC10012006(10012006, "删除角色失败, roleId=%s"),
    /**
     * Uac 10012007 error code enums.
     */
    UAC10012007(10012007, "批量删除角色失败, roleId=%s"),
    /**
     * Uac 10012008 error code enums.
     */
    UAC10012008(10012008, "找不到绑定的角色, roleId=%s"),


    /**
     * Uac 10013001 error code enums.
     */
    UAC10013001(10013001, "父菜单不存在,menuId=%s"),
    /**
     * Uac 10013002 error code enums.
     */
    UAC10013002(10013002, "更新上级菜单失败,menuId=%s"),
    /**
     * Uac 10013003 error code enums.
     */
    UAC10013003(10013003, "菜单不存在,menuId=%s"),
    /**
     * Uac 10013004 error code enums.
     */
    UAC10013004(10013004, "启用菜单失败,menuId=%s"),
    /**
     * Uac 10013005 error code enums.
     */
    UAC10013005(10013005, "禁用菜单失败,menuId=%s"),
    /**
     * Uac 10013006 error code enums.
     */
    UAC10013006(10013006, "更新菜单状态失败,menuId=%s"),
    /**
     * Uac 10013007 error code enums.
     */
    UAC10013007(10013007, "根菜单不能禁用"),
    /**
     * Uac 10013008 error code enums.
     */
    UAC10013008(10013008, "删除菜单失败, menuId=%s"),
    /**
     * Uac 10013009 error code enums.
     */
    UAC10013009(10013009, "请先分配菜单"),
    /**
     * Uac 10013010 error code enums.
     */
    UAC10013010(10013010, "选择菜单不是根目录,menuId=%s"),


    /**
     * Uac 10014001 error code enums.
     */
    UAC10014001(10014001, "找不到权限信息, actionId=%s"),
    /**
     * Uac 10014002 error code enums.
     */
    UAC10014002(10014002, "删除失败, actionId=%s"),
    /**
     * Uac 10014003 error code enums.
     */
    UAC10014003(10014003, "保存权限信息失败"),
    /**
     * Uac 10015001 error code enums.
     */
    UAC10015001(10015001, "找不到组织信息,groupId=%s"),
    /**
     * Uac 10015002 error code enums.
     */
    UAC10015002(10015002, "组织状态不存在"),
    /**
     * Uac 10015003 error code enums.
     */
    UAC10015003(10015003, "操作越权, 启用子节点, 必须先启用父节点"),
    /**
     * Uac 10015004 error code enums.
     */
    UAC10015004(10015004, "找不到组织信息,groupId=%s"),
    /**
     * Uac 10015006 error code enums.
     */
    UAC10015006(10015006, "更新组织信息失败,groupId=%s"),
    /**
     * Uac 10015007 error code enums.
     */
    UAC10015007(10015007, "该组织下还存在子节点，不能将其删除, Pid=%s"),
    /**
     * Uac 10015008 error code enums.
     */
    UAC10015008(10015008, "该组织下绑定的用户，不能将其删除, groupId=%s"),
    /**
     * Uac 10015009 error code enums.
     */
    UAC10015009(10015009, "找不到上级组织, groupId=%s"),
    /**
     * Mdc 10021001 error code enums.
     */
// 1002 数据中心
    MDC10021001(10021001, "获取地址信息失败"),
    /**
     * Mdc 10021002 error code enums.
     */
    MDC10021002(10021002, "找不到该地址信息"),
    /**
     * Mdc 10021003 error code enums.
     */
    MDC10021003(10021003, "找不到该用户信息"),

    MDC10021004(10021004, "获取用户信息失败"),

    MDC10021005(10021005, "获取用户微信昵称失败"),

    MDC10021006(10021006, "获取运营中心信息失败"),

    MDC10021007(10021007, "获取服务商信息失败"),

    MDC10021008(10021008, "获取服务商OEM信息失败"),

    MDC10021009(10021009, "获取商家信息信息失败"),

    MDC10021010(10021010, "上传的文件找不到"),

    MDC10021011(10021011, "文件上传失败"),

    WM10022001(10022001, "该运营中心名称已存在"),

    WM10022002(10022002, "该公司名称已存在"),

    WM10022003(10022003, "创建失败!"),

    WM10022004(10022004, "编辑失败!"),

    WM10022005(10022005, "操作失败!"),

    WM10022006(10022006, "删除失败!"),

    WM10022007(10022007, "创建运营中心失败!"),

    WM10022008(10022008, "保存角色信息失败!"),

    WM10022009(10022009, "保存角色和科目联系信息失败!"),

    WM10022010(10022010, "删除角色信息失败!"),

    WM10022011(10022011, "删除角色和科目联系信息失败!"),

    WM10022012(10022012, "角色信息传递失败!"),

    WM10022013(10022013, "系统类别(1 平台 | 2 智慧餐厅)不能为空!"),

    WM10022014(10022014, "角色id不可为空"),

    WM10022015(10022015, "该角色有职员占用，暂不可删除!"),

    WM10022016(10022016, "科目信息不可为空!"),

    WM10022017(10022017, "角色类型不可为空!"),

    WM10022018(10022018, "请求智慧餐厅科目信息失败!"),

    WM10022019(10022019, "层级不可为空!"),

    WM10022020(10022020, "获取餐厅角色的权限科目失败!"),

    WM10022021(10022021, "停启用智慧餐厅的角色失败!"),

    WM10022022(10022022, "删除智慧餐厅的角色失败!"),

    WM10022023(10022023, "停启用用户失败!"),

    WM10022024(10022024, "新建用户失败!"),

    WM10022025(10022025, "为用户设置平台角色失败!"),

    WM10022026(10022026, "用户id不可为空!"),

    WM10022027(10022027, "更新用户失败!"),

    WM10022028(10022028, "删除用户失败!"),

    WM10022029(10022029, "删除用户角色关联表失败!"),

    WM10022030(10022030, "商家信息不可为空!"),

    WM10022031(10022031, "片区信息不可为空!"),

    WM10022032(10022032, "智慧餐厅角色id不可为空!"),

    WM10022033(10022033, "为用户设置智慧餐厅角色失败!"),

    WM10022034(10022034, "删除用户关联的角色失败!"),

    WM10022035(10022035, "旧密码不可为空!"),

    WM10022036(10022036, "新密码不可为空!"),

    WM10022037(10022037, "修改密码失败!"),

    WM10022038(10022038, "旧密码错误!"),

    WM10022039(10022039, "操作失败, 已存在相同用户名!"),

    WM10022040(10022040, "操作失败, 已存在相同角色名!"),

    WM10022041(10022041, "组织信息不存在!"),

    WM10022042(10022042, "用户与组织信息操作失败!"),

    WM10022043(10022043, "获取主体信息失败!"),

    WM10022044(10022044, "上传文件为空!"),

    WM10022045(10022045, "操作失败, 已存在相同编号的栏目!"),

    WM10022046(10022046, "新建栏目失败!"),

    WM10022047(10022047, "更新栏目失败!"),

    WM10022048(10022048, "栏目ID不可为空!"),

    WM10022049(10022049, "设置消息为已读取失败!"),

    WM10022050(10022050, "保存推送信息失败!"),

    WM10022051(10022051, "服务器信息id缺失"),

    WM10022052(10022052, "获取角色的商家信息失败"),

    WM10022053(10022053, "发送验证码异常,清稍后再试!"),

    WM10022054(10022054, "找不到服务商信息!"),

    WM10022055(10022055, "找不到商家信息!"),

    WM10022056(10022056, "找不到片区信息!"),

    WM10022057(10022057, "找不到门店信息!"),

    WM10022058(10022058, "服务商/代理商id缺失!"),

    WM10022059(10022059, "商家id缺失!"),

    WM10022060(10022060, "修改角色失败!"),

    WM10022061(10022061, "自定义角色关联主体缺失!"),

    WM10022062(10022062, "redis注入失败!"),

    UAC10011063(10011063, "没有权限访问当前页面！"),

    /**wxdispatcher===========================begin*/
    WM100220541(100220541, "获取缓存数据失败！"),

    WM100220551(100220551, "获取数据库component数据失败！"),

    WM100220561(100220561, "核销卡券失败"),

    WM100220571(100220571, "卡包信息查询错误"),

    WM100220581(100220581, "卡包信息更新失败"),

    WM100220591(100220591, "查找该卡券失败"),

    WM100220601(100220601, "修改原卡券状态失败"),

    WM100220611(100220611, "插入卡券删除记录失败"),

    WM100220621(100220621, "查找用户记录失败"),

    WM100220631(100220631, "卡券删除失败"),

    WM100220641(100220641, "卡券插入卡包失败"),

    WM100220651(100220651, "卡包状态与过期时间更新失败"),

    WM100220661(100220661, "新增领取卡券记录失败"),

    WM100220671(100220671, "更新好友卡券的状态失败"),

    WM100220681(100220681, "新增使用卡券记录失败"),

    WM100220691(100220691, "authkey验证失败"),

    WM100220701(100220701, "用户数据初始化失败-插入用户信息失败"),

    WM100220711(100220711, "解析BusinessConfig失败"),

    WM100220712(100220712, "accesstoken获取失败"),

    /**wxdispatcher===========================end*/
    ;

    private int code;

    private String msg;

    /**
     * Msg string
     *
     * @return the string
     */
    public String msg() {
        return msg;
    }

    /**
     * Code int
     *
     * @return the int
     */
    public int code() {
        return code;
    }

    StatusCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * Gets enums
     *
     * @param code
     *         the code
     * @return the enums
     */
    public static StatusCode getEnum(int code) {
        for (StatusCode ele : StatusCode.values()) {
            if (ele.code() == code) {
                return ele;
            }
        }
        return null;
    }

}

